package com.wc.alorithm_blue_bridge._思维.估算分数;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/12/19 16:43
 * @description
 * https://www.lanqiao.cn/problems/20088/learning/?contest_id=229
 */
public class Main {
    /**
     * 思路；F(N) >= 0, F(N) == |F(N)| 不满足
     * 所以F(N) 一定是负数, 求出满足F(N) < 0 的个数
     * A * (B * N - C) < 0, B * N - C不能是 A 的 约数
     * N >= 1 并且 B * N - C 不是 A 的约数, 如何是的话, 那就部门组 F(N) 下取整 < F(N) 了
     * 找到 A 的所有约数, 看看 N 是否满足, 满足 答案 -1
     */
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static long a, b, c;

    public static void main(String[] args) {
        a = sc.nextLong();
        b = sc.nextLong();
        c = sc.nextLong();
        long res = 0;
        if (c % b == 0) res = c / b - 1;
        else res = c / b;
        long n = res;
        // 约数
        for (long i = 1; i * i <= a; i++) {
            if (a % i == 0) {
                // B * N - C == -i => N == (-i + C) / B
                if ((-i + c) % b == 0) {
                    // 满足了约数的条件
                    if ((-i + c) / b > 0 && n >= (-i + c) / b) res--;
                }

                // 还有一个对面的约束 i 是 a的约数, a / i 也是
                if (i * i != a) {
                    long t = a / i;
                    if ((-t + c) % b == 0) {
                        // 满足了约数的条件
                        if ((-t + c) / b > 0 && n >= (-t + c) / b) res--;
                    }
                }
            }
        }
        out.println(res);
        out.flush();
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}

